package com.ykc.spring;

import java.util.concurrent.ConcurrentHashMap;

import com.ykc.HelperLoader;
import com.ykc.helper.BeanHelper;

public class LubanApplicationContext {
    //非懒加载单例bean的创建

    private Class<?> configClass;
    private ConcurrentHashMap<String,BeanDefinition> beanDefinitionMap=new ConcurrentHashMap<String, BeanDefinition>();
    //单例池
    private ConcurrentHashMap<String,Object> singletonObjects=new ConcurrentHashMap<String, Object>();


    public LubanApplicationContext(Class<?> configClass) {
//        HelperLoader.init();
        this.configClass = configClass;

    }

    public Object getBean(String beanName){
        // beanName 单例的，原型的
        return BeanHelper.getBean(beanName);
    }


}
